<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['系统基础管理','对公账户管理','资金明细']" icon="fa fa-list"
			class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span>
					<h2>资金明细</h2>
				</header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn" style="width: calc(100% - 230px);">
								<div class="top_module top_module_box">
									<span class="module_text">账户名称</span>
									<div class="s_hover_box">
										<select class="select2" id="projectNameSelect">
											<option value=''></option>
										</select>
										<div class="s_del_icon" (click)='delProjectName()'>x</div>
									</div>
								</div>
								<div class="top_module top_module_box">
                                    <span class="module_text">流水单号</span>
                                    <input type="text" class="module_inp top_module_select" [(ngModel)]="tableSearchData.serialnumber" placeholder="流水单号"/>
                                </div>
								<div class="selectDate top_module">
									<table-select-date
									[startTimePlaceholder]="'选择到账开始时间'" [endTimePlaceholder]="'选择到账结束时间'" [specifyId]='specifyId' [specifyTime]='specifyTime' [notInit]="true" (outerTime)="dateSelect($event)" ></table-select-date>
								</div>

								<button class="btn btn-primary" (click)="tableSearch()">查询</button>
								<button class="btn btn-primary" (click)="table_add(CorporateAccountModal)">新增</button>
							</div>
						</div>
						<div class="table_scroll">
							<table
								class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>账户类型</th>
										<th>账户名称</th>
										<th>到账金额(元)</th>
										<th>到账时间</th>
										<th>流水单号</th>
										<th>流水单图片</th>
										<th>备注</th>
										<th>创建人</th>
										<th>创建时间</th>
										<th>更新时间</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData">
										<td>
											<span *ngIf="row.accountType == 1">水泥厂</span>
											<span *ngIf="row.accountType == 2">中间商</span>
										</td>
										<td>{{row.accountName}}</td>
										<td>{{row.arrivalAmount}}</td>
										<td>{{row.accountingDate}}</td>
										<td>{{row.serialnumber}}</td>
										<td>
											<button type="button"
												(click)="showImg(row,ImgModal)">点击查看</button>
										</td>
										<td>{{row.remark}}</td>
										<td>{{row.createName}}</td>
										<td>{{row.createTime}}</td>
										<td>{{row.updateTime}}</td>
										<td>
											<button type="button"
												(click)="editRow(row,CorporateAccountModal)">编辑</button>
											<button type="button" (click)="tableDel(row)">删除</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount" [rows]="pageSize" [currentPage]="curPage - 1"
								(onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i
									class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>


	<!--    弹窗-->
	<section bsModal #CorporateAccountModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
		aria-labelledby="myLargeModalLabel" aria-hidden="true">
		<div class="modal-dialog modal-lg">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" (click)="modalClose(CorporateAccountModal)"
						aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h4 class="modal-title">资金明细 - <span *ngIf="formType == 'new'">新增</span><span
							*ngIf="formType == 'updata'">编辑</span></h4>
				</div>
				<form id="CorporateAccountFrom" class="form-horizontal" role="form" novalidate="novalidate"
					[saBootstrapValidator]="validatorOptions">
					<div class="modal-body">
						<div class="row form-horizontal">
							<div class="form-group col-xs-12 s_fix_select2">
								<label class="control-label col-xs-2" for="newPassword">账户名称<sup>*</sup></label>
								<div class="col-xs-10 s_fix_select2_width s_fix_select2 ">
									<sa-select2 select2ElementID="roleSelect2Form"
										(optionSelected)="optionSelectedForm($event)" [dataList]="companyList"
										[paramFormat]="paramFormat" matchSearch="true">
									</sa-select2>
								</div>
							</div>
							<div class="form-group col-xs-12 clearfix">
								<label class="control-label col-sm-2 no-padding-right">到账时间<sup>*</sup></label>
								<div class="col-xs-10">
									<div class="clearfix renewalTime">
										<table-select-date #renewalTimeComp class="test" [notStart]='true'
											endTimePlaceholder="请选择到账时间" [isBeforeToday]="true"
											(outerTime)="datePickerSelected($event)"></table-select-date>
										<!-- 缴费时间的判断input -->
										<input class="form-control none" name="accountingDate" autocomplete="off"
											type="text" [(ngModel)]='CorporateAccountFrom.accountingDate'
											placeholder="到账时间" />
									</div>
								</div>
							</div>
							<div class="form-group col-xs-12">
								<label class="col-xs-2 control-label">到账金额<sup>*</sup></label>
								<div class="col-xs-10 insert_text">
									<input class="form-control" [(ngModel)]='CorporateAccountFrom.arrivalAmount'
										name='arrivalAmount' />
								</div>
							</div>
							<div class="form-group col-xs-12">
								<label class="col-xs-2 control-label">流水单号<sup>*</sup></label>
								<div class="col-xs-10 insert_text">
									<input class="form-control" [(ngModel)]='CorporateAccountFrom.serialnumber'
										name='serialnumber' />
								</div>
							</div>
							<div class="form-group col-xs-12">
								<label class="col-xs-2 control-label">备注</label>
								<div class="col-xs-10 insert_text">
									<input class="form-control" [(ngModel)]='CorporateAccountFrom.remark'
										name='remark' />
								</div>
							</div>
							<div class="form-group col-xs-12">
								<label class="col-xs-2 control-label">流水单图片<sup>*</sup></label>
								<div class="col-xs-10 imgFileList">
									<div class="imgFileList-power">
										<div class="imgFileList-multifile">
											<div class="uploadlocation uploadlocation1">
												<div class="content-list">
													<div class="headImg" *ngIf="CorporateAccountFrom.serialnumberImg">
														<div class="imgShow"><img class="img"
																[src]="CorporateAccountFrom.serialnumberImg"
																(click)="bigimg()">
														</div>
														<i class="deleteImg" (click)="deleteImg()"></i>
													</div>
													<div class="btn div_imgall"
														*ngIf="!CorporateAccountFrom.serialnumberImg">
														<div class="div_shuline"></div>
														<div class="div_hengline"></div>
														<input type="file" class="up" title=" " placeholder=" "
															accept="image/*" multiple
															(change)="multifileChange($event.target.files)" />
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>

							<!-- <div class="form-group col-xs-12">
								<label class="control-label col-xs-2">对接厂区<sup>*</sup></label>
								<div class="col-xs-10">
									<sa-company-tree-checkbox wrap="html" [threeState]="threeStateText"
										[inputApi]="inputApi" [inputParam]="inputParam" companyTreeId="companyTreeFrom"
										[Height]="32" [companyValue]="companyArrays"
										(companySelected)="addCompanySelected($event)"></sa-company-tree-checkbox>
								</div>
							</div>
							<div class="form-group col-xs-12">
								<label class="control-label col-xs-2 no-padding-right">账户类型<sup>*</sup></label>
								<div class="col-xs-10">
									<select class="form-control" name="accountType"
										[(ngModel)]='CorporateAccountFrom.accountType'
										(change)="typeChange($event.target.value)" style="width: 100%">
										<option value="">请选择</option>
										<option value="1">水泥厂</option>
										<option value="2">中间商</option>
									</select>
								</div>
							</div>
							<div class="form-group col-xs-12">
								<label class="col-xs-2 control-label">账户名称<sup>*</sup></label>
								<div class="col-xs-10 insert_text">
									<input class="form-control" [(ngModel)]='CorporateAccountFrom.accountName'
										name='accountName' />
								</div>
							</div>
							<div class="form-group col-xs-12">
								<label class="col-xs-2 control-label">备注</label>
								<div class="col-xs-10 insert_text">
									<input class="form-control" [(ngModel)]='CorporateAccountFrom.remark'
										name='remark' />
								</div>
							</div> -->
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default"
							(click)="modalClose(CorporateAccountModal)">取消</button>
						<button type="button" class="btn btn-primary"
							(click)="apiControlSubmit(CorporateAccountModal)">确认</button>
					</div>
				</form>
			</div>
		</div>
	</section>
	<!--  弹窗end-->

	<!-- 图片查看   弹窗-->
<section bsModal #ImgModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
	<div class="modal-dialog modal-lg">
		<div class="modal-content" style="width: 570px;">
			<div class="modal-header">
				<button type="button" class="close" (click)="imgClose(ImgModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title">流水单图片</h4>
			</div>
			<div class="modal-body">
				<div class="imagesInfo">
					<div class="imgShow" *ngFor="let item of imgLocalList" (click)="bigimg('Modal2',item)">
						<img [src]="item" alt="流水单图片"  style="cursor: pointer;"/>
					</div>
				</div>
			</div>
		</div>
	</div>
</section>

</div>